package com.study.basercvadapter.adapter;

import android.view.View;
import android.widget.TextView;

import androidx.annotation.NonNull;

import com.study.basercvadapter.R;
import com.study.basercvadapter.base.BaseRcvAdapter;

import java.util.List;

/**
 * 作者： zjf 10/31/20 1:11 PM
 * 参考：
 * 描述：
 */
public class RcvAdapter extends BaseRcvAdapter<String> {


    /**
     * 构造方法，初始化数据
     *
     * @param mList
     */
    public RcvAdapter(List<String> mList) {
        super(mList);
    }

    @Override
    protected int bindItemLayout(int viewType) {
        return R.layout.item_rcv;
    }

    @Override
    protected void convert(View itemView, @NonNull String data, int position) {
        TextView tv_item = itemView.findViewById(R.id.tv_item);
        tv_item.setText(data);
    }
}
